using System;
using System.Collections.Generic;
using System.Text;

namespace Dominio
{
    public class Role
    {
        private int id;
        private String description;
        private String home;
        //Contructor used by hibernate
        protected Role()
        {}

        public Role(String role)
        {
            this.description = role;
        }

        public virtual int Id
        {
            get { return id; }
            set { id = value; }
        }
        public virtual String Description
        {
            get { return description; }
            set { description = value; }
        }
        public virtual String Home
        {
            get { return home; }
            set { home = value; }
        }

        public virtual bool isTester(User user)
        {
            return user.Role.Description.Equals("Tester");
        }
        public virtual bool isTM(User user)
        {
            return user.Role.Description.Equals("Testing Manager");
        }

        public virtual bool isAdmin(User user)
        {
            return user.Role.Description.Equals("Admin");
        }


    }
}
